package components.validators
{
	import mx.validators.PhoneNumberValidator;
	
	import framework.LangMgr;
	
	import interfaces.IValidation;
	
	public class BasePhoneNumberValidator extends PhoneNumberValidator
	{
		public function BasePhoneNumberValidator()
		{
			super();
			invalidCharError = LangMgr.getResourceByLocaleKey("validate.invalidCharError");
			requiredFieldError = LangMgr.getResourceByLocaleKey("validate.requiredFieldError");
		}
		
		override public function initialized(document:Object, id:String):void
		{
			super.initialized(document, id);
			var validation:IValidation = document as IValidation;
			if(validation)
				validation.pushValidator(this);
		}
	}
}